getting the for index value instead of the address