Improved the algorithm to handle larger option sets with more reasonable results