Added a function for getting the best decision