added some print statements to make things easier to grasp for reader...