Addded mse.  changed when cost was calculated
reorder todo