refactor index methods