making correct use of the connection manager