Completed tasks 6 & 7 of assigment3