add stream support by reusing spliterator