class pattern