implemented the message db API