second solution is better :)