adding min, max, minby, maxby