yes that was stuff up - it was to stop it going passed a 0 value when a key was pushed and it never worked cos it was checked after the key had removed the value, so then value was the max value and so it never worked
so it was changed in the key routines to

if key = x then
if value <> 0 then value = value - 1
endif