array checks changed to LINQ