Added ability to take arbitary arguments to generate_action helper function