Under Welfare and Institutions 6500, providing for commitment of a retarded person charged with a crime, due process considerations require that the jury, as opposed to the judge, determine if the charged offense is one which involves death, great bodily injury, etc., and the court must instruct the jury that the persons mental retardation is a substantial factor in causing him difficulty in controlling his dangerous behavior. Section 6500 authorizes commitment of a mentally retarded person to the Department of Developmental Services if he is a danger to himself or others. The definition of danger to self can be a finding of incompetence to stand trial if the person is charged with a felony involving death, great bodily injury, etc. The determination as to whether the charged offense is violent or assaultive must be submitted to the jury as a defendant has a constitutional right to have a jury determine the existence of all elements of the offense charged and being a danger is an element of section 6500. With respect to the extended detention scheme inherent in section 6500, due process also dictates that the jury receive an instruction requiring it to find that mental retardation is a substantial factor causing defendant difficulty in controlling his dangerous behavior.