Add macros for before and after