implement js calling