class design