added timer start/stop in diagonalize function