updated js api and added license