separate actions in functions