defining macro to define model