Better class pattern