redone the timing so it is simpler