delete function for chat messages