create helper functions