add fold/reduce
build js