started implementing model in c++