proper line generation