merge two classes together