modify by fansm 20130514