Removed swaps and added edit code which is not working yet