made createline an internal function