more algorithm tunings