put all code in main class