change dynamic allocation the key array