make main file to a class