extract out helper functions to a helper file
Merge pull request #1039 from seanstrom/support/extract-helper-functions

extract out helper functions to a helper file