added test on flattable and on join