run.sh updated to take -p from first argument