Rewrite methods by using LINQ