history and future stacks and a current URL variable.visit(url), push current to history, set current to url, and clear future.back(steps), pop from history and push to future until steps are decremented to 0 or history is empty, then update current.forward(steps), pop from future and push to history until steps are decremented to 0 or future is empty, then update current.