added printouts for debugging