get rid of middleware