added erase_between implementation