we use C style cast (int)keys[i] or c++ cast elsewhere.