Modified code to work with last version of express