fix and upgrade API