working on delaying for the connection to complete before opening the connection window