edited api code