Changes parentItems to array usage for better matching