working version ready for RPI rendering mod