- simplified implementation of as_line_string function