fixed index bug
new template