some changes to model