some ifs for printing