[PD] some useful abstractions