refactor the method macro to behave the same as the other macros