refactor on index and navigation