small mods to api and adding js output in single plot