update solution 6