fixed join in fold code;

simplified code;
enabled fold code;