Changed map to index