wrote main class