added window ROIs calculation