Made Changes as per assignment