Use .index() to save time

cannot use it at first loop because there are same items in num and
index only return first index