CHANGD:applied the display/printout swicth function