added debgging print statements