it makes random moves on the device, awful ruby code