made compatible with .net 3.5; supplied as complete solution