made changes to model to help functionality