Added code for model