hw3 3rd exercise