this is part of a sumsqr thing I'll explain lower down