Implementing template mode