with action listener, pass some of the test cases