using API in add.html, other fixes