init

init from template code.