modified the linq query in step 2 and step 4