added async topics call to api.js