Add indirection so we can add a new algorithm later