added and refined templates