moved utility methods to bottom of file