Redoing HW3 part 1