add ruby implementation not finished