added some printouts for debug. Need to change to log