changed connection constructor, to use associative array as configuration