add support for minimum value, clean style