fix length, min and max arguments, improve required argument