The function should only check the immediate children not any grandchildren.