add xrefs and define case matching
add forgotten restriction on value cases