implementing model