add test in test_fitting.py