working version --optimizing NSC