working version of pushstate