correcting CO-smart-CAST algo

correcting CO-smart-CAST algo