only set existing connection if one is passed in