now support right/left replace mode