Threading and Template pattern is added