Updated to work with IDLE3.