private int calculate(int currentTotal, Token currentOperation) {
        if (expression.isEmpty()) {
            return currentTotal;
        }
        Token token = expression.remove();
        switch (token.token) {
            case (ProjectConstants.SIZE):
                if(currentOperation==null) {
                    currentTotal = sampleSize;
                } else {
                    currentTotal = evaluate(currentTotal, sampleSize, currentOperation);
                }
                break;
            case (ProjectConstants.DOUBLE):
                if(currentOperation==null) {
                    currentTotal = (int) Double.parseDouble(token.sequence);
                }
                else currentTotal = evaluate(currentTotal, Double.parseDouble(token.sequence), currentOperation);
                break;
            case (ProjectConstants.PLUSMINUSTIMESDIVIDE):
                currentOperation = token;
                break;
            case (ProjectConstants.OPENBRACKET):
                if(currentOperation==null) {
                    currentTotal = calculate(0, null);
                }
                else currentTotal = evaluate(currentTotal, calculate(0, null), currentOperation);
                break;
            case (ProjectConstants.CLOSEBRACKET):
                return currentTotal;
            default:
                break;
        }
        return calculate(currentTotal, currentOperation);
    }