add more debug info
remove useless code