implement remaining functions in line.py