adapted for rapberry Pi