changed KeyIdPair to public