changes to accomodate different fitting methods