Macros: how to add functionality to classes on-the-fly