diff --git a/cmd.h b/cmd.h
index 3ff9939..535b059 100644
--- a/cmd.h
+++ b/cmd.h
@@ -1,6 +1,10 @@
 #ifndef CMD_H
 #define CMD_H

+#define CMD_LENGTH    256
+#define CMD_ARG_NUM   10

+void do_cd(char *argv[]);
+void execute_new(char *argv[]);

 #endif
diff --git a/cmd.c b/cmd.c
index 72598c9..766942d 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,2 +1,49 @@
-#include "cmd.h"
+#include "./cmd.h"

+void do_cd(char *argv[]) {
+    if (argv[1] != NULL) {
+        if (chdir(argv[1]) < 0) {
+            switch (errno) {
+                case ENOENT:
+                    fprintf(stdout, "DIRECTORY NOT FOUND!\n");
+                    break;
+                case ENOTDIR:
+                    fprintf(stdout, "Not A DIRECTORY NAME!\n");
+                    break;
+                case EACCES:
+                    fprintf(stdout, "YOU DO NOT HAVE RIGHT TO ACCESS!\n");
+                    break;
+                default:
+                    fprintf(stdout, "SOME ERROR HAPPEND IN CHDIR!\n");
+                    break;
+            }
+        }
+    }
+}
+
+void execute_new(char *argv[]) {
+    pid_t pid;
+
+    pid = fork();
+    if (pid < 0) {
+        fprintf(stdout, "SOME HAPPENED IN FORK!\n");
+        exit(2);
+    } else if (pid == 0) {
+        if (execvp(argv[0], argv) < 0) {
+            switch (errno) {
+                case ENOENT:
+                    fprintf(stdout, "COMMAND OR FILENAME NOT FOUND\n");
+                    break;
+                case EACCES:
+                    fprintf(stdout, "YOU DO NOT HAVE RIGHT TO ACCESS!\n");
+                    break;
+                default:
+                    fprintf(stdout, "SOME ERROR HAPPENED IN EXEC\n");
+            }
+        }
+        exit(3);
+    } else {
+        wait(NULL);
+    }
+
+}
diff --git a/cmd.h b/cmd.h
index 535b059..a9f37cb 100644
--- a/cmd.h
+++ b/cmd.h
@@ -1,6 +1,14 @@
 #ifndef CMD_H
 #define CMD_H

+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+
 #define CMD_LENGTH    256
 #define CMD_ARG_NUM   10
diff --git a/minishell.c b/minishell.c
index e69de29..0c7eca4 100644
--- a/minishell.c
+++ b/minishell.c
@@ -0,0 +1,52 @@
+#include "./cmd.h"
+
+int main(void)
+{
+    char *cmd = (void*)malloc(CMD_LENGTH * sizeof(char));
+    char *cmd_arg[CMD_ARG_NUM];
+    int cmdlen, i, j, tag;
+
+    do {
+        memset(cmd, 0, CMD_LENGTH);
+        fprintf(stdout, "--Mini Shell=-*| ");
+        fgets(cmd, CMD_LENGTH, stdin);
+
+        cmdlen = strlen(cmd);
+        --cmdlen;
+        cmd[cmdlen] = '\0';
+
+        memset(cmd_arg, 0, CMD_ARG_NUM);
+        i = 0, j = 0, tag = 0;
+        while (i < cmdlen && j < 10) {
+            if (cmd[i] == ' ') {
+                cmd[i] = '\0';
+                tag = 0;
+            } else {
+                if (tag == 0) {
+                    cmd_arg[j++] = cmd + i;
+                    tag = 1;
+                }
+            }
+            ++i;
+        }
+
+        if (i >= CMD_ARG_NUM && i < cmdlen) {
+            fprintf(stdout, "Too MANY ARGUMENTS!\n");
+        }
+
+        if (strcmp(cmd_arg[0], "quit") == 0) {
+            break;
+        }
+
+        if (strcmp(cmd_arg[0], "cd") == 0) {
+            do_cd(cmd_arg);
+            continue;
+        }
+
+        execute_new(cmd_arg);
+
+    } while(1);
+
+    return 0;
+}
+