refactoring, simplify logs