Updated templates; added solution to swap elements