Added a method to change the p constant (for testing)