solution 2 done