refit function

Refit a mable to a new dataset