now passing a function to the listen method to handle incoming message