just moved some print statements around