Implemented all in main class