created ROI support, refactored code