added -e to echo for new index to fix indentation