much better with array and reduce!