integral kinda works, although it loses some of the sum