turned of debugging statements. changed a print to a dbg