My solution v. 2