modify by fansm 20130521