use reduce(), assuming it's faster