Changed if-else into switch(string) now available in Java 7