Update python, js implementation