update api and update test fix