refactor API updates