* clean code: extracted methods to express intent
* logging improved