moved util functions and macros to separate file