working on the toy parameter estimation code