get rid of unnecessary min/max set calls