add a ruby implementation