Handling the step click event