implemented history stack manipulation, still broken on page refresh