workshop solution (untested on hardware, compiles)