added linear fit (wip)