modularizing templates