added curve-fitting code and readme