fixing the script to run on a pi