move utility functions into utility class