this is super hard to read. using two nested forEach loops would make the code much more readable.