added numeric min/max support