improve event handling/linking macros