added some middleware for express