refactor and implement default template part2