modify export
fix doc
use internal comparator functions