add retire function