replace range with select