add index template and change global define variables