use longs as indexes and sizes