pop off x only when k is small enough