add some helper functions