updates main class