middleware for all reqs