implement db connections