removed nslog and repalced with ddlog statements
fixed delegate issues