CHANGED:applied the cut_and_print() function;