add code

separate the class and main