added comments to refactored macro