added undo line and active line position