reverted to manual code for item swapping