Added Update function to model