adds pushstate functionality