refactored macro to declare actions