finalized how model is connected to view