changed layout in api.js