adds destroy and update functions to messages model