added latency as config option