got c detection routine working and added fitting to command line script
c detection routine working. started adding fitting to command line script