Modified to use pg for production