started moving utility functions to their own file