solution of #19.