Assignemnt 7 now functions