fit polynomial works as expected