automatically calculates best k with new system