refactored all_entries update into separate function and added doc strings