use function to define and can restart the application