refactoring

changed indexator method