correct needsType in exception method.
add feature of distinct method.