extract http.Handler creation into separate method