learning to implment join, flatMap and joinViaFlatMap.^