for our curiosity (and benchmarking) we can build a getline equivalent of the example program