refactoring entries method