Renamed r to routesArray
Renamed event to routeEvent