private String[] splitName(String name) {
        //initialize array
		String[] split_string = new String[3];
		//initialize variables
        int index = 0;
		int start = 0;
		int end = 0;
		int space_counter = 0;
		//treats spaces as delimiters and puts substrings of name in array
		for(int i = 0; i < name.length(); i++) {
			if(name.charAt(i) == 32 || i == name.length() - 1) {
				end = (i + 1);
			    split_string[index] = name.substring(start, end);
				index++;
                start = end;
			}
			if(name.charAt(i) == 32)
				space_counter++;
		}
        //if there are two names, sets middle name to "NMN"
		if(space_counter < 2) {
			split_string[2] = split_string[1];
		    split_string[1] = "NMN";
		}
		
		return split_string;	        
    }