add kmp implement and delete directory travel