add a method for getting an index property