added MessageManager class