refactor IndexEntry constructor