the second version using pass-join