Refactoring with error (missing latency time)