add tests and macro changes