implemented javascript integration