replace record dictionary with MessageObject, and update all tests