Modified to work on RaspberryPi