added check for dofmap