templates implementation.