public String parse(String text)
	{
		if(text.length() != 0)
		{
			//String lowerCase = text.toLowerCase(); //Convert string to lower case to avoid case mismatches
			String lowerCase= text;
			//Trim trailing spaces and remove duplicate whitespaces
			lowerCase = lowerCase.trim();
			
			Pattern pattern = Pattern.compile("\\s+");
		    Matcher matcher = pattern.matcher(lowerCase);
		    lowerCase = matcher.replaceAll(" ");
		    
			
			if(lowerCase.equals("save") || lowerCase.equals("exit") || lowerCase.equals("quit"))
			{
				return parseCommand(lowerCase,lowerCase);
			}
			
			
			if(lowerCase.contains(" "))
			{
				if(lowerCase.equals("show saves") || lowerCase.equals("save as") || lowerCase.equals("new game"))
					return parseCommand(lowerCase, lowerCase);
				String s= lowerCase.substring(0, lowerCase.lastIndexOf(' '));
				String i= lowerCase.substring(lowerCase.lastIndexOf(' ') + 1, lowerCase.length());

				

			return parseCommand(s,i);
			}
			
			else return "Invalid command";
		}

		else return "";
	}