call middleware handler