finished implementing the MessageManager