use global id allocation enum
use long instead of int