change so that logger is injected