minor adaptation for r-Pi