cleaning out handler
middleware