First implementation of advice algorithm.