some hopefully useful utilities