modify fit method