prepared for formToDoc and docToForm