Add instanceAtIndex method