fixed printing problem, finished