Rewritten in Ruby