unused k and posMin is initialized