Improving efficiency in operations in ROI functions, by using set functions.