combine two classes into one class