added flatMapWith in java API