changes route collections from arrays to objects