edited solution

...