Untested encapsulated row swap function