.Net 2.0 compatibility

removed linq usage for compatibility with .net framework 2.0