2nd edit to run on Pi, success