added join network logic