added ILogger interface
refactoring