Added the first function of Assignment 3