added some functionality to join and think