update some code for ROIs