adding third option for index with javascript