setond step of rewriting - modify templates, modify calling templates