and modified printing logic