enhanced logic according to ioio documentation