Updated algorithm ready for large volume testing.