passing connection parameters as an array to constructor