simplified extending lines to the screen borders