[feat] improved line calculation