use placeholders for logging
improve code and tests