changed index to load from template file