added macro support to generics