got the macro to generate for multiple types