Assignment 2 functions created