fixed loggers and added unit tests