update qn 3 and 5