program assignment 2 functions complete