refactor some utility methods to a more logical place