parametrized connection to db