include missing header and renamed index to elIndex.