compressed code in both tennis.rb and test file