solved q5.4