renamed element to index