refactored to use newest rocktimer sources. added tests.