made some changes to the template and to the models