Prog Assignement 2 functions created