delete some unuseful comments and add check function,but there are still some bugs