adding nan indices location finding