changed to js api v3.6