line completion and removal