added pg gem and db connection call