Update rbd_change_frange.py

Refactored code