finish implementing macroses support