adding solution 2