added function to app.listen