initial cut at speed alg