added an operator[] method