handle initial load
now also remembers last data and view url