refactored for new logger