effectively ported over to 3.12 for RPi. NOT YET TESTEDls!