added print statements to show the interaction