updated array key indexing in router