branch cleanup script as a function