adding conditional debugging print statements