update internal function toArray()
add Pipeline mechanism