added return statement to index operator function