implemented swapping tools