Add javascript implementation