now passing the correct statement to the listener