solve problem #19