Added new method replace_interval()