removed unnecessary index assignment