added two macros to make object construction more automated