made faster and adaptive