changing logic in index