added middleware folder and moved middleware