re-wrote timing using System.Stopwatch for more accurate timing