change skip and swap to return void