add basics for graceful shutdown