partial solution for Q10 added