script for PHrange optimisation