added specs to better cover newmacro, determine and invoke functions