add some more printf statements for clarity