optimising method has been changed to BFGS; parameter reltol has been added