move routePoints to global scope