remove references to linq where not necessary