fix up for test runs to find suitable k