updated other players code, added getIndex() function