public String stringParser(String unparsedAssembly) {
		String[] parsed = unparsedAssembly.split(" ");
        String ops = parsed[0],rs, rt, rd, shamt, binString = null;
        int Opcode = 0, funct, immediate;
        //LengthCheck checker = new LengthCheck();
        
        for(int i = 0; i<rType.length; i++){
        	if (ops.equalsIgnoreCase(rType[i]))
        	{
        		
                parsed = parsed[1].split(",");
                for(int j = 0; j<parsed.length; j++)
                	parsed[j] = parsed[j].trim();
                rs = parsed[1];
                rt = parsed[2];
                rd = parsed[0];
                rs = LengthCheck.fillerLength(toBinary(registerNum(rs)));
                rt = LengthCheck.fillerLength(toBinary(registerNum(rt)));
                rd = LengthCheck.fillerLength(toBinary(registerNum(rd)));
                ops = LengthCheck.opsLength(toBinary(rTypeFunctcodes[i]));
                shamt = LengthCheck.fillerLength(toBinary(0));
                binString = "000000"+rs+rt+rd+shamt+ops;
                
        	}
        }
        
        for(int i = 0; i<iType.length; i++){
        	if(ops.equalsIgnoreCase(iType[i]))
        	{
        		if(iType[i]=="sw"||iType[i]=="lw"){
        			String[] funzies;
        			parsed = parsed[1].split("[,() ]+");
        			rs=parsed[2];
        			rt=parsed[0];
        			immediate=Integer.parseInt(parsed[1]);
        		}
        		else{
        			String[] nocommas;
        		/*	System.out.println(parsed[0]);
        			System.out.println(parsed[1]);
        			System.out.println(parsed[2]);
        			System.out.println(parsed[3]);*/
        			
        			nocommas = parsed[1].split(",");
        			rs=nocommas[1];
        			//System.out.println(rs);
        			//nocommas = parsed[2].split(",");
        			rt=nocommas[0];
        			//nocommas = parsed[3].split(" ");
        			immediate=Integer.parseInt(nocommas[2]);
        			//System.out.println(nocommas[0]);
        			
        		}
        			
                rs = LengthCheck.fillerLength(toBinary(registerNum(rs)));
                rt = LengthCheck.fillerLength(toBinary(registerNum(rt)));
                ops = LengthCheck.opsLength(toBinary(iTypeOpcodes[i]));
                String imme = Integer.toBinaryString(immediate);
                imme = LengthCheck.immLength(imme);
                binString = ops + rs + rt + imme; 		
        	} 	
        }
        
        for(int i = 0; i<jType.length; i++){
        	if(ops.equalsIgnoreCase(jType[i]))
        	{
                //address = Integer.parseInt(parsed[1]);
                String address = Integer.toBinaryString(Integer.parseInt(parsed[1]));
                address = LengthCheck.addLength(address);
                ops = LengthCheck.opsLength(toBinary(jTypeOpcodes[i]));
                binString = ops + address;
        	}	
        }
		
		
		return binString;
	}