fix sum stuff