public static double solve(Node node)			//TODO: make for (x/y)/(a/d)
    {
        if(node.data.length() == 0)
            return 0;
            if(node.child.size() == 0)
            return Double.parseDouble(node.data);
        double ans, leftArgument, rightArgument;
        switch( node.data.charAt(0) )
        {
            case '+':
                ans= 0;
                for (Node aChild : node.child) {
                    ans += solve(aChild);
                }
                return ans;
            case '-':
                return -1*solve(node.child.get(0));			//return the negative of child's value
            case '*':
                ans= 1;
                for (Node aChild : node.child) {
                    ans *= solve(aChild);
                }
                return ans;
            case '/':
                leftArgument = solve(node.child.get(0));
                rightArgument = solve(node.child.get(1));
                return leftArgument / rightArgument;
            case '^':
                leftArgument = solve(node.child.get(0));
                rightArgument = solve(node.child.get(1));
                return Math.pow(leftArgument,rightArgument);
            default:
                return Double.parseDouble(node.data);

        }
    }