implemented random upper line generation for lines of a specified length.