removed all printf statement for correct behavior