rename index to results before merging other code
merge with front end