tail + head: implement variable lines