little refactoring - in order to make code testable with akka's test kit