refactoring, log nicer