add bash function cleanup