modify join method