added js api