made encoding ints not allocate on heap
merge