updated controller and view to reflect type of message