scoping template finished