refactor head on index