Script modifications to test PHrange optimisation algorithm