added pg and rails factor 12