add option to ensure a connection is made