logger can be null here