minor change to js api to accommodate other params