adding route middleware for parameters