Version 0.4.2

Optimize the logic and remove the creating template function