chapter12 and fixes swap func