Modify Add_Action function - make it more generic