Merging two classes