Modified code to cover new model