using logger instead of print