WIP: fit polynomials