added onHashChange event handler