added $max, $min and $dec