added middleware for express