delete some useless code and add some explaination