take min length as an option