changed index and map