fix sort order, reanable and optimize intersection