changed indexing for elements from