Added some helper functions