exercise 3.13
exercise 3.14
function that returns last pair of the input