private ArrayList<String[]> splitPacketsFromStream(String message){
		
		ArrayList<String[]> packets = new ArrayList<>();
		ArrayList<String> tempPacket = new ArrayList<>();
		
		int i = 1;
		int j = 1;
		
		if(!Character.isDigit(message.charAt(1))){
			tempPacket.add(PacketTypes.INVALID.toString());
			packets.add(tempPacket.toArray(new String[tempPacket.size()])); //toarray orginally returns array of objects
			return packets;
		}
		
		for(i = 1; i < message.length(); i++){
			char c = message.charAt(i);  
			
			if(!Character.isDigit(c)){
				try{
					int typeLength = Integer.parseInt(message.substring(j,i)) + 1;
					
					//check if is the escape character notifying the end of a packet
					if(typeLength == 2 && message.substring(i+1, i + typeLength).equals(";")){ 
						String[] subpacket = tempPacket.toArray(new String[tempPacket.size()]);
						packets.add(subpacket);
						tempPacket.clear();
					}else{
						//build up on our packet
						tempPacket.add(message.substring(i+1, i + typeLength)); //add 1 to i to skip the :
					}
				
					//great we've found a number so lets next part of the string as that will contain the
					//the argument
					i += typeLength + 1;
					i = i >= message.length() ? message.length()-1 : i;
					j = i;
				}catch(NumberFormatException e){
					return packets;
				}
			}
		}
		
		return packets;
	}