done fixing pg connect logic in Samples