refined helper macros and added utils class