-Improving decision function for demo 1