Added some utility functions