A new approach in modeling template polymerization