Improving and generalizing template attracks door B. Kirkels