use map + sum for something that works 4 realzz, thanks @hjdivad