add header file and clean useless code