added some debuggin modifications.