renamed index to first