Added functions, almost done with Question1
-Frank