api code altered