address hongkai's code review