Swapped gp and p