Tested adaptive algorithm