better sampling script
fixed conflict