changes for simple testability
changes for unit tests