working version using rpi2d
working version with rpi2d