assignment 6 mostly correct #6