incorporated utility functions into package to reduce number of dependencies