added sum_entries, working on index