adding proper index