With ruby implementation