added ElementKeyType and ElementValueType (and fixed minor type error)