add a middleware for connect / express