changed fn overwrite to use addeventlistener onhashchange