fleshed out match.rb