rewriting fitting routine