add flatten
add reduce