handle the case when number of points less than k