How to run an action each time after user input