added debug print outs