file refactor
minpq, maxpq