first solution of 4.