added pg and railsfactor