finalised changes to improve RPi pris speed