cleaned up some outputs, added some debug output