use compare and swap
add DialTimeout