fixed wrong p