changed Integer to Word64 for potential compiler unboxing