adding print statements to debug