refactored message view to listen to change in model