with gap-to-speed lookup function