Remove switch on string variable to support Java 6 students