add min max for doubles