print statements added to debug