various changes to makes things work with new coeff ordering.