refactored getters into macros