Improved templates on border line cases