combine for/back-ward sums in one func called fbsums