modified Main file