Added swap_arrays procedure and tested it with rcb