Started flexible diagonal algorithm.