changed ranges to require min and max