update class Main