diff --git a/res/drawable/ic_misc.xml b/res/drawable/ic_misc.xml
new file mode 100644
index 0000000..e3befc3
--- /dev/null
+++ b/res/drawable/ic_misc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/ic_misc_b"
+          android:state_selected="true" />
+    <item android:drawable="@drawable/ic_misc_w" />
+</selector>
diff --git a/res/drawable/ic_misc_b.png b/res/drawable/ic_misc_b.png
new file mode 100644
index 0000000..a5c4bb6
--- /dev/null
+++ b/res/drawable/ic_misc_b.png
Binary files differ
diff --git a/res/drawable/ic_misc_w.png b/res/drawable/ic_misc_w.png
new file mode 100644
index 0000000..b8593f3
--- /dev/null
+++ b/res/drawable/ic_misc_w.png
Binary files differ
diff --git a/src/org/zeroxlab/benchmark/Benchmark.java b/src/org/zeroxlab/benchmark/Benchmark.java
index 64ca8e8..7ab4e09 100644
--- a/src/org/zeroxlab/benchmark/Benchmark.java
+++ b/src/org/zeroxlab/benchmark/Benchmark.java
@@ -113,26 +113,29 @@
     private final String MAIN = "Main";
     private final String D2 = "2D";
     private final String D3 = "3D";
-    private final String MISC = "Misc";
+    private final String MATH = "Math";
     private final String VM = "VM";
     private final String NATIVE = "Native";
+    private final String MISC = "Misc";
 
     private CheckBox d2CheckBox;
     private CheckBox d3CheckBox;
-    private CheckBox miscCheckBox;
+    private CheckBox mathCheckBox;
     private CheckBox vmCheckBox;
     private CheckBox nativeCheckBox;
+    private CheckBox miscCheckBox;
 
     private HashMap< String, HashSet<Case> > mCategory = new HashMap< String, HashSet<Case> >();
 
     private final String trackerUrl = "http://0xbenchmark.appspot.com/static/MobileTracker.html";
 
     boolean mAutoRun = false;
-    boolean mCheckMisc = false;
+    boolean mCheckMath = false;
     boolean mCheck2D = false;
     boolean mCheck3D = false;
     boolean mCheckVM = false;
     boolean mCheckNative = false;
+    boolean mCheckMisc = false;
     boolean mAutoUpload = false;
 
     @Override
@@ -172,16 +175,17 @@
 
         mCategory.put(D2, new HashSet<Case>());
         mCategory.put(D3, new HashSet<Case>());
-        mCategory.put(MISC, new HashSet<Case>());
+        mCategory.put(MATH, new HashSet<Case>());
         mCategory.put(VM, new HashSet<Case>());
         mCategory.put(NATIVE, new HashSet<Case>());
+        mCategory.put(MISC, new HashSet<Case>());
 
         // mflops
         mCases.add(arith);
         mCases.add(scimark2);
         mCases.add(javascript);
-        mCategory.get(MISC).add(arith);
-        mCategory.get(MISC).add(scimark2);
+        mCategory.get(MATH).add(arith);
+        mCategory.get(MATH).add(scimark2);
         mCategory.get(MISC).add(javascript);
 
         // 2d
@@ -229,7 +233,7 @@
         Bundle bundle = intent.getExtras();
         if (bundle != null) {
             mAutoRun = bundle.getBoolean("autorun");
-            mCheckMisc = bundle.getBoolean("misc");
+            mCheckMath = bundle.getBoolean("math");
             mCheck2D = bundle.getBoolean("2d");
             mCheck3D = bundle.getBoolean("3d");
             mCheckVM = bundle.getBoolean("vm");
@@ -237,8 +241,8 @@
             mAutoUpload = bundle.getBoolean("autoupload");
         }
 
-        if (mCheckMisc && !miscCheckBox.isChecked()) {
-            miscCheckBox.performClick();
+        if (mCheckMath && !mathCheckBox.isChecked()) {
+            mathCheckBox.performClick();
         }
 
         if (mCheck2D && !d2CheckBox.isChecked()) {
@@ -256,6 +260,10 @@
         if (mCheckNative && !nativeCheckBox.isChecked()) {
             nativeCheckBox.performClick();
         }
+
+        if (mCheckMisc && !miscCheckBox.isChecked()) {
+            miscCheckBox.performClick();
+        }
         /*
         if (intent.getBooleanExtra("AUTO", false)) {
             ImageView head = (ImageView)findViewById(R.id.banner_img);
@@ -430,9 +438,9 @@
                     d3CheckBox.setText(D3);
                     d3CheckBox.setOnClickListener(Benchmark.this);
 
-                    miscCheckBox = new CheckBox(Benchmark.this);
-                    miscCheckBox.setText(MISC);
-                    miscCheckBox.setOnClickListener(Benchmark.this);
+                    mathCheckBox = new CheckBox(Benchmark.this);
+                    mathCheckBox.setText(MATH);
+                    mathCheckBox.setOnClickListener(Benchmark.this);
 
                     vmCheckBox = new CheckBox(Benchmark.this);
                     vmCheckBox.setText(VM);
@@ -442,6 +450,10 @@
                     nativeCheckBox.setText(NATIVE);
                     nativeCheckBox.setOnClickListener(Benchmark.this);
 
+                    miscCheckBox = new CheckBox(Benchmark.this);
+                    miscCheckBox.setText(MISC);
+                    miscCheckBox.setOnClickListener(Benchmark.this);
+
                     TextView mWebInfo = new TextView(Benchmark.this);
                     mWebInfo.setText("Uploaded results:\nhttp://0xbenchmark.appspot.com");
 
@@ -468,11 +480,12 @@
                     mTracker.loadUrl(trackerUrl);
                     mMainViewContainer.addView(mIconView,wrapContent);
                     mMainViewContainer.addView(mBannerInfo);
-                    mMainViewContainer.addView(miscCheckBox);
+                    mMainViewContainer.addView(mathCheckBox);
                     mMainViewContainer.addView(d2CheckBox);
                     mMainViewContainer.addView(d3CheckBox);
                     mMainViewContainer.addView(vmCheckBox);
                     mMainViewContainer.addView(nativeCheckBox);
+                    mMainViewContainer.addView(miscCheckBox);
                     mMainViewContainer.addView(mWebInfo);
                     mMainViewContainer.addView(mButtonContainer, fillWrap);
                     mMainViewContainer.addView(mTracker, 0,0);
@@ -515,10 +528,10 @@
         mTabHost.addTab(mTabHost.newTabSpec(MAIN).setIndicator(MAIN, getResources().getDrawable(R.drawable.ic_eye)).setContent(mTCF));
         mTabHost.addTab(mTabHost.newTabSpec(D2).setIndicator(D2, getResources().getDrawable(R.drawable.ic_2d)).setContent(mTCF));
         mTabHost.addTab(mTabHost.newTabSpec(D3).setIndicator(D3, getResources().getDrawable(R.drawable.ic_3d)).setContent(mTCF));
-        mTabHost.addTab(mTabHost.newTabSpec(MISC).setIndicator(MISC, getResources().getDrawable(R.drawable.ic_pi)).setContent(mTCF));
+        mTabHost.addTab(mTabHost.newTabSpec(MATH).setIndicator(MATH, getResources().getDrawable(R.drawable.ic_pi)).setContent(mTCF));
         mTabHost.addTab(mTabHost.newTabSpec(VM).setIndicator(VM, getResources().getDrawable(R.drawable.ic_vm)).setContent(mTCF));
         mTabHost.addTab(mTabHost.newTabSpec(NATIVE).setIndicator(NATIVE, getResources().getDrawable(R.drawable.ic_c)).setContent(mTCF));
-
+        mTabHost.addTab(mTabHost.newTabSpec(MISC).setIndicator(MISC, getResources().getDrawable(R.drawable.ic_misc)).setContent(mTCF));
     }
 
     public void onClick(View v) {
@@ -547,8 +560,8 @@
             }
             intent.setClassName(Report.packageName(), Report.fullClassName());
             startActivity(intent);
-        } else if (v == d2CheckBox || v == d3CheckBox || v == miscCheckBox ||
-                   v == vmCheckBox || v == nativeCheckBox) {
+        } else if (v == d2CheckBox || v == d3CheckBox || v == mathCheckBox ||
+                   v == vmCheckBox || v == nativeCheckBox || v == miscCheckBox) {
             int length = mCases.size();
             String tag = ((CheckBox)v).getText().toString();
             for (int i = 0; i < length; i++) {
