Implement it in ruby instead?