Improved client algorithm