added support for func(http.Handler) http.Handler middleware