update the main class