refactoring RoadNetwork class