stable, separate some script to external script