Add replace parameter to ui
Added test for change