public String evaluatePostfix(String pfs) {
        Stack<String> evaluationStack = new Stack<String>();

        String arr[]=pfs.split(" ");

        for(int i=0;i<arr.length-1;i++){
            if(!arr[i].equals("+")&&!arr[i].equals("*")&&!arr[i].equals("=")){
                if(variableValues.containsKey(arr[i])&&i!=0){
                    evaluationStack.push(variableValues.get(arr[i]).toString());
                }
                else{
                    evaluationStack.push(arr[i]);
                }
            }else if(arr[i].equals("+")){
                Float val1 = Float.valueOf(evaluationStack.pop());
                Float val2 = Float.valueOf(evaluationStack.pop());
                evaluationStack.push(Float.toString(val1+val2));
            } else if(arr[i].equals("*")){
                Float val1 = Float.valueOf(evaluationStack.pop());
                Float val2 = Float.valueOf(evaluationStack.pop());
                evaluationStack.push(Float.toString(val1*val2));
            } else{
                Float val1 = Float.valueOf(evaluationStack.pop());
                String val2 = evaluationStack.pop();
                variableValues.put(val2,val1);
                evaluationStack.push(val1.toString());
            }
        }

        return evaluationStack.peek();
    }