support template configuration. Close #32