extract class definition to other file