restructuring: new function Line.__contains__