key function update
update test script
follow API changes