modified Main application server to run infinitely