cleaned up data join method