way better detune logic