and that next_integer function really shouldn't be inside an if macro