add function for action