created middleware skeleton