Added code for calcTargets method