separate main and clas