first version of preconnect (untested)