attempting to speed up the row swapping time