adding hashchange detection