Version using forEach