implemented macro to use in workflow