finished getTemplate