add python and ruby implementations