Added Input Middleware