added printout code