added some more util functions