move to retire function