implemented elapsedTime method