Updated logic for join
added features for server 2008