add java fold