some useful utilities