delete some comments. use log to replace printf