added printf statements