utility functions split into header and definition file