Combined work from RPI and Mac.