fit template method