updated framework of the main file