[master] refactor helper functions to be in util object