input into middleware