modify by  fansm