updating main class