use min_v in buffer.jl