added check for required submessages as well