let
refresh i = nextid := i-1; !nextid