added more helper functions and moved helper macros to test headers