moving utility functions to the util module