changed models, added function to view messages