reworked how ranges are passed into generate