refactoring to use cat macro