create base and index templates