extract handlers to handlers.go