improved registration macros