added basic model logic