merge 2 almost identical classes together