additions for fitting model