working pvalu simulation
working version