init with template and first page