delay and sum algorithm