added custom version of hashchange