merged and updated clear_churned shell script