updating to make min and max length generic and make argument passing and parsing possible