replace firstObject with objectAtIndex:0