add graceful stop