better join script. improveddd.