added ruby implementations
added ruby implementation