working version before adding stopwatch
added stopwatch support. working version