Pass index as argument to know which elementis currently accessed