fix class design