make algo configurable.