class model implementation