Challenge 2: inefficient processing wise, but works