worked on an upgrade api, however it doesnt work