array index on class with problems of line