merge correctly class attributes