Finally works with retrigger, needs code for other values of x...