updated
swamped np.sum with np.add.reduce since it's faster