BAT Reusable Code