working code for the decision vector