removed unnecessary code from api