Prevent boxing, use while loops