The role of secondary nucleation in epitaxial growth: the template model