minor update for api.js