basic connection manager. much more needs to be done, but this is functional