change next from HandlerFunc to Handler