created clear_swap