general debugging. Not complete.