dont use logger directly, rather through the function