function exercise 1
function exercise 2.2
exercise 2.3
exercise 2.4