simplified prepended spaces computation for sum