adding printf debug statement