reworked connection manager