updated prune script