Made all the chages as asked, remove the printout statements