Ereased the old functions and created a new funtion create the whole frame and print the whole fram at once.