modified tennis.java