Trying to port rollsum.