renderLine helper