retire function fit