added some useful utility macros