fitting scripts