solved q5.8