Improved 3rd order algorithm