Optimized code run\stop the application