A couple of useful utilities