still trying to make the debug logging make more sense