added all helper functions