removing unused code from api