extract route processing to the Route class