public void cd() throws Exception {
		try {
			//cd
			if (tokens.size() == 1) {
				path = Paths.get(System.getProperty("user.dir"));
				dStream.writeBytes("\n");
			}
			//cd ..
			else if (tokens.get(1).equals("..")) {
				if (path.getParent() != null)
					path = path.getParent();
				
				dStream.writeBytes("\n");
			}
			//cd somedirectory
			else {
				//not a directory or file
				if (Files.notExists(path.resolve(tokens.get(1)))) {
					dStream.writeBytes("cd: " + tokens.get(1) + ": No such file or directory" + "\n");
				} 
				//is a directory
				else if (Files.isDirectory(path.resolve(tokens.get(1)))) {
					path = path.resolve(tokens.get(1));
					dStream.writeBytes("\n");
				}
				//is a file
				else {
					dStream.writeBytes("cd: " + tokens.get(1) + ": Not a directory" + "\n");
				}
			}
		} catch (Exception e) {
			dStream.writeBytes("cd: " + tokens.get(1) + ": Error" + "\n");
		}
	}