refactor modal history to account for browsers not supporting hisotry and session storage