Added the listen() function