added various helper functions