some refactoring, logging, synchronized