template and rules adjustment