add template
add initialize command
Refactaring