added some code in main class